package com.changgou.web.filter;

public class UrlFilter {

    //需要拦截携带token的请求地址
    public static String filterPath="/api/wseckillorder,/api/wcenter/**,/api/centerpay/**,/api/seckill,/api/wxpay,/api/wxpay/**,/api/worder/**,/api/user/**,/api/address/**,/api/wcart/**,/api/cart/**,/api/categoryReport/**,/api/orderConfig/**,/api/order/**,/api/orderItem/**,/api/orderLog/**,/api/preferential/**,/api/returnCause/**,/api/returnOrder/**,/api/returnOrderItem/**,/api/collect/**,/api/wcollect/**";

    public static boolean hasAuthorize(String uri){
        String[] strs = filterPath.replace("/**", "").split(",");
        for (String str : strs) {
            if (uri.startsWith(str)){
                return true;
            }
        }
        return false;
    }
}
